user nginx;
worker_processes auto;
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

events {
    use epoll;
    multi_accept on;
    worker_connections 2048;
}

http {
    
    include /etc/nginx/mime.types;
    default_type application/force-download;

    # Supported log formats
    log_format postdata '$remote_addr - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent" "$request_body"';

    proxy_redirect ~^http://([^:]+):443(/.+)$ https://$1$2;

    # settings files

    server_tokens off;

    # Disable request logging in nginx by default
    #access_log /var/log/nginx/access.log  postdata;
    access_log      off;
    error_log       on;
    
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    client_max_body_size        1024m;
    client_body_buffer_size     4m;


    # Content compression parameters
    gzip                on;
    gzip_proxied        any;
    gzip_static         on;
    gzip_http_version   1.0;
    gzip_types          application/x-javascript application/javascript text/css;

    add_header "X-Content-Type-Options" "nosniff";
    add_header X-Frame-Options SAMEORIGIN;

    open_file_cache max=1000 inactive=30s;
    
    include /etc/nginx/conf.d/*.conf;
}
